/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.smanager.gui.menu;

import br.com.smanager.gui.template.TemplateCRUD;

public class GUIMenu extends javax.swing.JFrame {

    TemplateCRUD novatela;
            
    public GUIMenu() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        desktopPane = new javax.swing.JDesktopPane();
        barraMenu = new javax.swing.JMenuBar();
        menuCadastro = new javax.swing.JMenu();
        menuCadastroPessoa = new javax.swing.JMenu();
        itemMenuPessoa = new javax.swing.JMenuItem();
        menuCadastroProjeto = new javax.swing.JMenu();
        itemMenuTime = new javax.swing.JMenuItem();
        separatorProjeto = new javax.swing.JPopupMenu.Separator();
        itemMenuSprint = new javax.swing.JMenuItem();
        itemMenuHistoria = new javax.swing.JMenuItem();
        menuCadastroOperacional = new javax.swing.JMenu();
        itemMenuHistoricoTarefa = new javax.swing.JMenuItem();
        menuExecucao = new javax.swing.JMenu();
        itemMenuApontamento = new javax.swing.JMenuItem();
        menuSistema = new javax.swing.JMenu();
        itemMenuSobre = new javax.swing.JMenuItem();
        separadorSistema = new javax.swing.JPopupMenu.Separator();
        itemMenuLogout = new javax.swing.JMenuItem();
        itemMenuSair = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Menu de Opções");

        menuCadastro.setText("Cadastro");

        menuCadastroPessoa.setText("Pessoa");

        itemMenuPessoa.setText("Pessoa");
        itemMenuPessoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuPessoaActionPerformed(evt);
            }
        });
        menuCadastroPessoa.add(itemMenuPessoa);

        menuCadastro.add(menuCadastroPessoa);

        menuCadastroProjeto.setText("Projeto");

        itemMenuTime.setText("Time");
        menuCadastroProjeto.add(itemMenuTime);
        menuCadastroProjeto.add(separatorProjeto);

        itemMenuSprint.setText("Sprint");
        menuCadastroProjeto.add(itemMenuSprint);

        itemMenuHistoria.setText("História");
        menuCadastroProjeto.add(itemMenuHistoria);

        menuCadastro.add(menuCadastroProjeto);

        menuCadastroOperacional.setText("Operacional");

        itemMenuHistoricoTarefa.setText("Histórico Tarefa");
        menuCadastroOperacional.add(itemMenuHistoricoTarefa);

        menuCadastro.add(menuCadastroOperacional);

        barraMenu.add(menuCadastro);

        menuExecucao.setText("Execução");

        itemMenuApontamento.setText("Apontamento");
        menuExecucao.add(itemMenuApontamento);

        barraMenu.add(menuExecucao);

        menuSistema.setText("Sistema");

        itemMenuSobre.setText("Sobre");
        itemMenuSobre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuSobreActionPerformed(evt);
            }
        });
        menuSistema.add(itemMenuSobre);
        menuSistema.add(separadorSistema);

        itemMenuLogout.setText("Logout");
        menuSistema.add(itemMenuLogout);

        itemMenuSair.setText("Sair");
        itemMenuSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuSairActionPerformed(evt);
            }
        });
        menuSistema.add(itemMenuSair);

        barraMenu.add(menuSistema);

        setJMenuBar(barraMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 842, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void itemMenuPessoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuPessoaActionPerformed
        // TODO add your handling code here:
        /*
        if (novatela == null) {
            novatela = new PessoaGUI();
            desktopPane.add(novatela);
        }
        
        novatela.setVisible(true);*/
    }//GEN-LAST:event_itemMenuPessoaActionPerformed

    private void itemMenuSobreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuSobreActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_itemMenuSobreActionPerformed

    private void itemMenuSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuSairActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_itemMenuSairActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(GUIMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(GUIMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(GUIMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(GUIMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GUIMenu().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar barraMenu;
    private javax.swing.JDesktopPane desktopPane;
    private javax.swing.JMenuItem itemMenuApontamento;
    private javax.swing.JMenuItem itemMenuHistoria;
    private javax.swing.JMenuItem itemMenuHistoricoTarefa;
    private javax.swing.JMenuItem itemMenuLogout;
    private javax.swing.JMenuItem itemMenuPessoa;
    private javax.swing.JMenuItem itemMenuSair;
    private javax.swing.JMenuItem itemMenuSobre;
    private javax.swing.JMenuItem itemMenuSprint;
    private javax.swing.JMenuItem itemMenuTime;
    private javax.swing.JMenu menuCadastro;
    private javax.swing.JMenu menuCadastroOperacional;
    private javax.swing.JMenu menuCadastroPessoa;
    private javax.swing.JMenu menuCadastroProjeto;
    private javax.swing.JMenu menuExecucao;
    private javax.swing.JMenu menuSistema;
    private javax.swing.JPopupMenu.Separator separadorSistema;
    private javax.swing.JPopupMenu.Separator separatorProjeto;
    // End of variables declaration//GEN-END:variables
}
